package com.teraflopx.apache.camel;

import org.apache.camel.builder.RouteBuilder;

public class ContentBasedRouterBuilder extends RouteBuilder {

	public void configure() {

		from("file:src/data?noop=true").choice()
				.when(xpath("/person/city = 'London'")).log("UK message")
				.to("file:target/messages/uk").otherwise().log("Other message")
				.to("file:target/messages/others");
	}

}
